package com.mxy.myapplication.util;

import android.content.Context;
import android.graphics.Bitmap;

import com.bumptech.glide.load.engine.bitmap_recycle.BitmapPool;
import com.bumptech.glide.load.resource.bitmap.BitmapTransformation;

/**
 * Glide圆形图方法
 */

public class GlideCircleTransform extends BitmapTransformation{

    public GlideCircleTransform(Context context) {
        super(context);
    }

    @Override
    protected Bitmap transform(BitmapPool pool, Bitmap toTransform, int outWidth, int outHeight) {
        return Util.makeRoundBitmap(toTransform);
    }

    @Override
    public String getId() {
        return getClass().getName();
    }
}
